import httpUtils from "@/core/utils/http.utils"
const urls = {
    'detail': `/api/wlsyqz/exp/`,
    'postConclusion': `/api/wlsyqz/resindex/updateIndex1`,
    'getConclusion': `/api/wlsyqz/resindex/page1/`,
    'exportJlx': `/api/wlsyqz/resindex/exportResIndexExcelByExpId/`
}

const experDetailApi = {
    // 顶部实验详情
    getDetail(urlId) {
        return httpUtils.get(urls.detail + urlId)
    },
    // 提交实验内容
    postConclusion(params) {
        return httpUtils.postRequest(urls.postConclusion, params)
    },
    // 获取实验内容
    getConclusion(urlId) {
        return httpUtils.get(urls.getConclusion + urlId)
    },
    // 导出实验数据
    exportJlx(expId, fileName) {
        // url, mode, name, param, fileType  
        //  "post",param.tableName,param,"zip"
        return httpUtils.downloadUrlMode(urls.exportJlx + expId, 'post', fileName, null, 'xlsx')
    },
}
export default experDetailApi
